package com.wangyu.generator.core.impl;

import com.wangyu.generator.config.CodeConfigType;
import com.wangyu.generator.core.context.CodeContext;
import com.wangyu.generator.core.context.GeneratorType;
import org.apache.velocity.VelocityContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * OracleMapperGenerator
 *
 * @author: zhangQ
 * @date: 2016-8-18 17:16
 */
public class OracleMapperGenerator extends MapperGenerator {

  /**
   * sl4j
   */
  private static final Logger LOGGER = LoggerFactory.getLogger(OracleMapperGenerator.class);

  @Override
  public void initVelocityContext(VelocityContext velocityContext, CodeContext cxt) {
    super.initVelocityContext(velocityContext, cxt);
    velocityContext.put(CodeConfigType.ORACLE_SCHEMA.getDesc(),
        cxt.getAttribute(CodeConfigType.ORACLE_SCHEMA));
  }

  @Override
  protected GeneratorType getPackageConfigType() {
    return GeneratorType.ORACLE_MAPPER;
  }
}
